home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 23 / CU Amiga - Super CD-ROM 23 (June 1998).iso / CUCD / Online / RFCs / rfc / rfc2306.txt < prev    next >
Encoding:
Text File  |  1998-04-03  |  58.0 KB  |  1,404 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7. Network Working Group                                        G. Parsons
  8. Request for Comments: 2306                             Northern Telecom
  9. Category: Informational                                     J. Rafferty
  10.                                                    Human Communications
  11.                                                              March 1998
  12.  
  13.  
  14.          Tag Image File Format (TIFF) - F Profile for Facsimile
  15.  
  16.  
  17. Status of this Memo
  18.  
  19.    This memo provides information for the Internet community.  It does
  20.    not specify an Internet standard of any kind.  Distribution of this
  21.    memo is unlimited.
  22.  
  23. Copyright Notice
  24.  
  25.    Copyright (C) The Internet Society (1998).  All Rights Reserved.
  26.  
  27. Overview
  28.  
  29.    This document describes in detail the definition of TIFF-F that is
  30.    used to store facsimile images.  The TIFF-F encoding has been
  31.    folklore with no standard reference definition before this document.
  32.  
  33. Internet Fax Working Group
  34.  
  35.    This document is a product of the IETF Internet Fax Working Group.
  36.    All comments on this document should be forwarded to the email
  37.    distribution list at <ietf-fax@imc.org>.
  38.  
  39. 1.  Abstract
  40.  
  41.    This document references the Tag Image File Format (TIFF) to define
  42.    the F profile of TIFF for facsimile (TIFF-F) as a file format that
  43.    may be used for the storage and interchange of facsimile images.
  44.  
  45. 2.  TIFF Definition
  46.  
  47.    TIFF (Tag Image File Format) Revision 6.0 is defined in detail within
  48.    [TIFF].
  49.  
  50.    A brief review of concepts used in TIFF is included in this document
  51.    as background information, but the reader is directed to the original
  52.    TIFF specification [TIFF] to obtain specific technical details.
  53.  
  54.  
  55.  
  56.  
  57.  
  58. Parsons & Rafferty           Informational                      [Page 1]
  59.  
  60. RFC 2306                     TIFF-F Profile                   March 1998
  61.  
  62.  
  63. 2.1  Baseline TIFF and Applications
  64.  
  65.    TIFF provides a method to describe and store raster image data.  A
  66.    primary goal of TIFF is to provide a rich environment within which
  67.    implementations can exchange image data.  [TIFF] characterizes
  68.    Baseline TIFF as being the core of TIFF, the essentials that all
  69.    mainstream TIFF developers should support in their products.
  70.    Applications of TIFF are defined by using Baseline TIFF as a starting
  71.    point and then defining "extensions" to TIFF that are used for the
  72.    specific "application", as well as specifying any other differences
  73.    from Baseline TIFF.
  74.  
  75. 3.  TIFF-F Definition
  76.  
  77. 3.1 Introduction
  78.  
  79.    Though it has been in common usage for many years, TIFF-F has
  80.    previously never been documented in the form of a standard.  An
  81.    informal TIFF-F document was originally created by a small group of
  82.    fax experts led by Joe Campbell.  The existence of TIFF-F is noted in
  83.    [TIFF] but it is not defined.  This document defines the F
  84.    application of [TIFF]. For ease of reference, the term TIFF-F will be
  85.    used throughout this document as a shorthand for "F Profile of TIFF
  86.    for Facsimile".  TIFF-F files are intended for use with the
  87.    image/tiff MIME media content-type which includes support for the
  88.    "application" parameter (e.g., application=faxbw).
  89.  
  90.    The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
  91.    "SHOULD", "SHOULD NOT", "RECOMMENDED",  "MAY", and "OPTIONAL" in this
  92.    document are to be interpreted as described in [REQ].
  93.  
  94.  3.1.1 TIFF-F Historical Background
  95.  
  96.    Up until TIFF 6.0, TIFF supported various "Classes" which defined the
  97.    use of TIFF for various applications. Classes were used to support
  98.    specific applications and in this spirit, TIFF-F has been known
  99.    historically as "TIFF Class F".  Previous informal TIFF-F documents
  100.    used the "Class F" terminology.
  101.  
  102.    As of TIFF 6.0 [TIFF], the TIFF Class concept has been eliminated in
  103.    favor of the concept of Baseline TIFF.  Therefore, this document
  104.    updates the definition of TIFF-F as the F profile of TIFF for
  105.    facsimile, by using Baseline TIFF as defined in [TIFF] as the
  106.    starting point and then defining the differences from Baseline TIFF
  107.    which apply for TIFF-F.   In almost all cases, the resulting
  108.    definition of TIFF-F fields and values remains consistent with those
  109.    used historically in earlier definitions of TIFF Class F.  Where some
  110.  
  111.  
  112.  
  113.  
  114. Parsons & Rafferty           Informational                      [Page 2]
  115.  
  116. RFC 2306                     TIFF-F Profile                   March 1998
  117.  
  118.  
  119.    of the values for fields have been updated to provide more precise
  120.    conformance with the ITU-T [T.4] and [T.30] fax recommendations,
  121.    these differences are noted.
  122.  
  123. 3.1.2     Overview
  124.  
  125.    The intent of this specification is to document:
  126.  
  127.    1)  The fields and values which are applicable for this F profile
  128.        of TIFF for facsimile.
  129.    2)  A minimum set of TIFF-F fields and values which should be able
  130.        to interwork with virtually all historic TIFF-F readers.
  131.    3)  A broader range of values for the traditional TIFF-F fields
  132.        that will provide support for the most widely used facsimile
  133.        compressions, page sizes and resolutions, consistent with the
  134.        ITU-T [T.4] and [T.30] recommendations.
  135.  
  136.    The structure of the TIFF-F definition will be as follows.  A brief
  137.    review of the structure of TIFF files and practical guidelines for
  138.    the writing and reading of multi-page TIFF-F files is provided in
  139.    sections 3.1.3 and 3.1.4.
  140.  
  141.    A review of TIFF-F fields follows.  Section 3.2 reviews the fields
  142.    from Baseline TIFF that are applicable for black and white (bi-
  143.    level) images and are also used by TIFF-F.
  144.  
  145.    Section 3.3 reviews the other required TIFF-F fields. Several fields
  146.    that are specific extensions for  TIFF-F  are reviewed in section
  147.    3.4.  There are also fields that may be helpful, but are not
  148.    required.  These recommended fields are listed in the section 3.5.
  149.    Section 3.6 defines the requirements for the minimum subset of TIFF-F
  150.    fields and values to maximize interoperability.  Several technical
  151.    topics, including implementation issues and warnings are discussed in
  152.    subsequent sections.  Finally, section 3.9 introduces the TIFF-F
  153.    Reader and Writer.  A table of the required and recommended fields
  154.    for a TIFF-F Reader is provided, along with details on the permitted
  155.    set of values.
  156.  
  157. 3.1.3 Structure of TIFF Files
  158.  
  159.    The structure of TIFF files is specified within [TIFF].  In this
  160.    section, a short summary of the TIFF structure is included for the
  161.    informational purposes.   In addition, some practical guidelines for
  162.    the use of this structure in reading and writing TIFF-F files are
  163.    addressed in the following section 3.1.4.  The structure for writing
  164.    "minimum subset" TIFF-F files is defined in section 3.6.2.
  165.  
  166.  
  167.  
  168.  
  169.  
  170. Parsons & Rafferty           Informational                      [Page 3]
  171.  
  172. RFC 2306                     TIFF-F Profile                   March 1998
  173.  
  174.  
  175.    A TIFF file begins with an 8-byte image file header that defines the
  176.    byte order used within a file (see section 3.9.1), includes a magic
  177.    number sequence that identifies the content as a TIFF file, and then
  178.    uses an offset to point to the first Image File Directory (IFD).  An
  179.    IFD is a sequence of tagged fields, sorted in ascending order (by tag
  180.    value), that contains attributes of an image and pointers to the
  181.    image data.   TIFF fields (also called entries) contain a tag, its
  182.    type (e.g. short, long, rational, etc.), a count (which indicates the
  183.    number of values/offsets) and a value/offset.  However, the actual
  184.    value for the field will only be present if it fits into 4 bytes;
  185.    otherwise, an offset will be used to point to the location of the
  186.    data associated with the field.  In turn, this offset may itself be
  187.    used to point to an array of offsets.
  188.  
  189.    For the case of facsimile data, many documents consist of a series of
  190.    multiple pages.   Within TIFF, these may be represented using more
  191.    than one IFD within the TIFF file.   Each IFD defines a subfile whose
  192.    type is given in the NewSubfileType field.  For the case of facsimile
  193.    data that is placed in a TIFF-F file, each facsimile page in a
  194.    multi-page document has its own IFD.   For bi- level facsimile files,
  195.    multiple IFDs are organized as a linked list, with the last entry in
  196.    each IFD pointing to the next IFD (the pointer in the last IFD is 0).
  197.    (There is also another technique for organizing multiple IFDs as a
  198.    tree, that uses the SubIFDs field, but this technique is not
  199.    applicable for TIFF-F images.)  Within each IFD, the location of the
  200.    related image data is defined by using fields that are associated
  201.    with strips.  These fields identify the size of strips (in rows), the
  202.    number of bytes per strip after compression and a strip offset, which
  203.    is used to point to the actual location of the image strip.
  204.  
  205.    TIFF has a very flexible file structure, but the use of some
  206.    practical guidelines for implementors when writing  multi-page TIFF-
  207.    F files can produce TIFF structures which are easier for readers to
  208.    process.   This is especially for implementations in environments
  209.    such as facsimile terminals where a complex file structure is
  210.    difficult to support.
  211.  
  212. 3.1.4 Practical Guidelines for Writing/Reading Multi-Page TIFF-F Files
  213.  
  214.    Traditionally, historical TIFF-F has required readers and writers to
  215.    be able to handle multi-page TIFF-F files.  Based on the experience
  216.    of various TIFF-F implementors, it has been seen that the
  217.    implementation of TIFF-F can be greatly simplified if certain
  218.    practical guidelines are followed when writing multi-page TIFF-F
  219.    files.  However, for interchange robustness, TIFF-F readers SHOULD be
  220.    prepared to read TIFF files whose structure is consistent with
  221.    [TIFF], which supports a more flexible file structure than is
  222.    recommended here.
  223.  
  224.  
  225.  
  226. Parsons & Rafferty           Informational                      [Page 4]
  227.  
  228. RFC 2306                     TIFF-F Profile                   March 1998
  229.  
  230.  
  231.    The structure for a multi-page TIFF-F file will include one IFD per
  232.    page of the document.   Therefore, each IFD will define the
  233.    attributes for a single page.   For simplicity, the writer of TIFF- F
  234.    files SHOULD present IFDs in the same order as the actual sequence of
  235.    pages.  (The pages are numbered within TIFF-F beginning with page 0
  236.    as the first page and then ascending (i.e. 0, 1, 2,...).  However, as
  237.    noted in section 3.1.3, any field values over 4 bytes will be stored
  238.    separately from the IFD. TIFF-F readers SHOULD expect IFDs to be
  239.    presented in page order, but be able to handle exceptions.
  240.  
  241.    Per [TIFF], the exact placement of image data is not specified.
  242.    However, the strip offsets for each strip of image are defined from
  243.    within each IFD.   Where possible, a second simplifying assumption
  244.    for the writing of TIFF-F files is to specify that the image data for
  245.    each page of a multi-page document SHOULD be contained within a
  246.    single strip (i.e. one image strip per fax page).   The use of a
  247.    single image strip per page is very useful for implementations such
  248.    as store and forward messaging, where the file is usually prepared in
  249.    advance of the transmission, but other assumptions may apply for the
  250.    size of the image strip for implementations which require the use of
  251.    "streaming" techniques (see section 3.7.6).  In the event a different
  252.    image strip size assumption has been used (e.g. constant size for
  253.    image strips which may be less than the page size), this will
  254.    immediately be evident from the values/offsets of the fields that are
  255.    related to strips.   From the TIFF-F reader standpoint, one image
  256.    strip per page permits the image data to be found through reference
  257.    via a single offset, resulting in a much simplified image structure
  258.    and faster processing.
  259.  
  260.    A third simplifying assumption is that each IFD SHOULD be placed in
  261.    the TIFF-F file structure at a point which precedes the image which
  262.    the IFD describes.  If any long field values are present (see section
  263.    3.1.3) then these SHOULD be placed after their referencing IFD and
  264.    before the image data they describe.
  265.  
  266.    A fourth simplifying assumption for TIFF-F writers and readers is to
  267.    place the actual image data in a physical order within the TIFF file
  268.    structure which is consistent with the logical page order.  In
  269.    practice, TIFF-F readers will need to use the strip offsets to find
  270.    the exact physical location of the image data, whether or not it is
  271.    presented in logical page order.
  272.  
  273.    TIFF-F writers MAY make a fifth simplifying assumption, in which the
  274.    IFD, the value data and the image data for which the IFD has offsets
  275.    precede the next image IFD. These elements MUST precede the next
  276.    image IFD in the minimum set TIFF-F files (see section 3.6.2).
  277.    However, this principle has been relaxed in the case of TIFF-F to
  278.    reflect past practices.
  279.  
  280.  
  281.  
  282. Parsons & Rafferty           Informational                      [Page 5]
  283.  
  284. RFC 2306                     TIFF-F Profile                   March 1998
  285.  
  286.  
  287.    So, a TIFF-F file which is structured using the guidelines of this
  288.    section will essentially be composed of a linked list of IFDs,
  289.    presented in ascending page order, which in turn each point to a
  290.    single page of image data (one strip per page), where the pages of
  291.    image data are also placed in a logical page order within the TIFF-F
  292.    file structure.  (The pages of image data may themselves be stored in
  293.    a contiguous manner, at the option of the implementor).
  294.  
  295. 3.2  Baseline TIFF  Required Fields for BiLevel Images
  296.  
  297.    Baseline TIFF per [TIFF] requires that the following fields be
  298.    present for all BiLevel Images:  ImageWidth, ImageLength,
  299.    Compression, PhotometricInterpretation, StripOffsets, RowsPerStrip,
  300.    StripByteCounts, XResolution, YResolution and ResolutionUnit.  TIFF-F
  301.    uses all of these fields, but in some cases specifies a different
  302.    range of acceptable values than Baseline TIFF.   Per [TIFF], if
  303.    fields are omitted, the Baseline TIFF default value(if specified)
  304.    will apply.
  305.  
  306.    In the field definitions which follow in this section and subsequent
  307.    sections, the fields will be presented in the following form:
  308.  
  309.    Fieldname (tag-number) = values (if applicable). TYPE
  310.  
  311.    A brief summary of the Baseline TIFF fields and their use in TIFF-F
  312.    follows:
  313.  
  314.    ImageWidth(256) = 1728, 2048, 2432, 2592, 3072, 3648, 3456, 4096,
  315.                      4864.
  316.        SHORT or LONG.  These are the fixed page widths in pixels.  The
  317.        permissible values are dependent upon X and Y resolutions as
  318.        shown in sections 2 and 3 of [T.4] and reproduced here for
  319.        convenience:
  320.  
  321.        XResolution x Yresolution                  | ImageWidth
  322.       --------------------------------------------|------------------
  323.        204x98, 204x196, 204x391, 200x100, 200x200 | 1728, 2048, 2432
  324.        300x300                                    | 2592, 3072, 3648
  325.        408x391, 400x400                           | 3456, 4096, 4864
  326.       --------------------------------------------|------------------
  327.  
  328.        Historical TIFF-F did not include support for the following
  329.        widths related to higher resolutions:  2592, 3072, 3648, 3456,
  330.        4096 and 4864.   Historical TIFF-F documents also included the
  331.        following values related to A5 and A6 widths:  816 and 1216.  Per
  332.        the most recent version of [T.4], A5 and A6 documents are no
  333.  
  334.  
  335.  
  336.  
  337.  
  338. Parsons & Rafferty           Informational                      [Page 6]
  339.  
  340. RFC 2306                     TIFF-F Profile                   March 1998
  341.  
  342.  
  343.        longer supported in Group 3 facsimile, so the related width
  344.        values are now obsolete.  See section 3.8.2 for more information
  345.        on inch/metric equivalencies and other implementation details.
  346.  
  347.    ImageLength (257).  SHORT or LONG. LONG recommended.
  348.        The total number of scan lines in the image.
  349.  
  350.    Compression (259) = 3,4.  SHORT.
  351.        This is a required TIFF-F field.  The permitted values for TIFF-
  352.        F purposes are 3 and 4 as shown.   The default value per Baseline
  353.        TIFF is 1 (Uncompressed), but this value is invalid for facsimile
  354.        images.    Baseline TIFF also permits use of value 2 (Modified
  355.        Huffman encoding), but the data is presented in a form which does
  356.        not contain EOLs. Instead, TIFF-F specifies the value 3 for
  357.        encoding one-dimensional T.4 Modified Huffman or 2-dimensional
  358.        Modified READ data.   The detailed settings which apply for T.4
  359.        encoded data are specified using the T4Options field.  TIFF-F
  360.        also permits use of the value 4 for the compression field, which
  361.        indicates that the data is coded using a [T.6] compression method
  362.        (i.e the Modified Modified READ two-dimensional method). The
  363.        detailed settings which apply for T.6 encoded data are specified
  364.        using the T6Options field.
  365.  
  366.        Please refer to the definitions of the T4Options and T6Options
  367.        fields in section 3.3, and section 3.8 for more information on
  368.        the encoding of images and conventions used within TIFF-F.
  369.  
  370.    PhotometricInterpretation (260) = 0,1.  SHORT.
  371.        This field allows notation of an inverted ("negative") image:
  372.                0 = normal
  373.                1 = inverted
  374.  
  375.    StripOffsets (273).  SHORT or LONG.
  376.        For each strip, the offset of that strip.  The offset is measured
  377.        from the beginning of the file. If a page is expressed as one
  378.        large strip, there is one such entry per page.
  379.  
  380.    RowsPerStrip (278).  SHORT or LONG.  LONG recommended.
  381.        The number of scan lines per strip.  When a page is expressed as
  382.        one large strip, this is the same as the ImageLength field.
  383.  
  384.    StripByteCounts (279).  LONG or SHORT.  LONG recommended.
  385.        For each strip, the number of bytes in that strip. If a page is
  386.        expressed as one large strip, this is the total number of bytes
  387.        in the page after compression.  Note that the choice of LONG or
  388.        SHORT depends upon the size of the strip.
  389.  
  390.  
  391.  
  392.  
  393.  
  394. Parsons & Rafferty           Informational                      [Page 7]
  395.  
  396. RFC 2306                     TIFF-F Profile                   March 1998
  397.  
  398.  
  399.    ResolutionUnit (296) = 2,3.  SHORT.
  400.        The units of measure for resolution:
  401.                2 = Inch
  402.                3 = Centimeter
  403.  
  404.        TIFF-F has traditionally used inch based measures.
  405.  
  406.    XResolution (282) = 204, 200, 300, 400, 408 (inches). RATIONAL.
  407.        The horizontal resolution of the TIFF-F image expressed in pixels
  408.        per resolution unit. The values of 200 and 408 have been added to
  409.        the historical TIFF-F values, for consistency with [T.30].  Some
  410.        existing TIFF-F implementations may also support values of 77
  411.        (cm).  See section 3.8.2 for more information on inch/metric
  412.        equivalencies and other implementation details.
  413.  
  414.    YResolution (283) = 98, 196, 100, 200, 300, 391, 400  (inches).
  415.                        RATIONAL.
  416.        The vertical resolution of the TIFF-F image expressed in pixels
  417.        per resolution unit. The values of 100, 200, and 391 have been
  418.        added to the historical TIFF-F values, for consistency with
  419.        [T.30].  Some existing TIFF-F implementations may also support
  420.        values of 77, 38.5 (cm). See section 3.8.2 for more information
  421.        on inch/metric equivalencies and other implementation details.
  422.  
  423. 3.3  TIFF-F Required Fields
  424.  
  425.    In addition to the Baseline TIFF fields, there are additional
  426.    required fields for TIFF-F. A review of the additional required
  427.    fields for TIFF-F follows:
  428.  
  429.    BitsPerSample (258) = 1.  SHORT.
  430.        Since TIFF-F  is only used for black-and-white facsimile images,
  431.        the value is  1 (the default) for all files.
  432.  
  433.    FillOrder (266) = 1, 2.  SHORT.
  434.        TIFF  F readers must be able to read data in both bit orders, but
  435.        the vast majority of facsimile products store data LSB first,
  436.        exactly as it appears on the telephone line.
  437.                1 = Most Significant Bit first.
  438.                2 = Least Significant Bit first.
  439.  
  440.    NewSubFileType (254)= (Bit 1 = 1).  LONG.
  441.        This field is made up of 32 flag bits.  Unused bits are
  442.        expected to be 0 and bit 0 is the low order bit.   Bit 0 is set
  443.        to 0 for TIFF-F.   Bit 1 is always set to 1 for TIFF-F,
  444.        indicating a single page of a multi-page image. The same bit
  445.  
  446.  
  447.  
  448.  
  449.  
  450. Parsons & Rafferty           Informational                      [Page 8]
  451.  
  452. RFC 2306                     TIFF-F Profile                   March 1998
  453.  
  454.  
  455.        settings are used when TIFF-F is used for a one page fax image.
  456.        See sections 3.1.1 and 3.1.2 for more details on the structure
  457.        of multi-page TIFF-F image files.
  458.  
  459.    PageNumber (297).  SHORT/SHORT.
  460.        This field specifies the page numbers in the fax document.  The
  461.        field comprises two SHORT values: the first value is the page
  462.        number, the second is the total number of pages. Single-page
  463.        documents therefore use 0000/0001 hex.  If the second value is
  464.        0, the total number of pages in the document is not available.
  465.  
  466.    SamplesPerPixel (277) = 1.  SHORT.
  467.        The value of 1 denotes a bi-level, grayscale, or palette color
  468.        image.
  469.  
  470.    There is also a requirement to include either the T4Options or the
  471.    T6Options field in a TIFF-F IFD, depending upon the setting of the
  472.    Compression field.  These fields are defined in the next section on
  473.    TIFF extensions.
  474.  
  475. 3.4  TIFF-F Extensions
  476.  
  477.    These are fields which are extensions beyond the required TIFF-F
  478.    fields.  The following fields have been defined as extensions in
  479.    [TIFF].
  480.  
  481.    T4Options (292) (Bit 0 = 0 or 1, Bit 1 = 0, Bit 2 = 0 or 1).  LONG.
  482.        This field is required if the value for the compression field
  483.        has been set to 3.   The values are set as shown below for TIFF-
  484.        F.   For TIFF-F, uncompressed data is not allowed and EOLs MAY
  485.        be byte aligned (see section 3.8.3).
  486.                bit 0 = 0 for 1-Dimensional, 1 for 2-Dimensional (MR)
  487.                bit 1 = must be 0 (uncompressed data not allowed)
  488.                bit 2 = 0 for non-byte-aligned EOLs or 1 for byte-
  489.                        aligned EOLs
  490.  
  491.        This field is made up of a set of 32 flag bits. Unused bits
  492.        must be set to 0.  Bit 0 is the low order bit.  Please note
  493.        that T4Options was known as G3Options in earlier versions of
  494.        TIFF and TIFF-F.  The data in a TIFF-F image encoded using
  495.        one of the T.4 methods is not terminated with an RTC (see
  496.        section 3.8.5).
  497.  
  498.    T6Options (293) = (Bit 0 = 0, Bit 1 = 0)  LONG.
  499.        This field is required for TIFF-F if value of the compression
  500.        field has been set to 4. The value for this field is made up of
  501.        a set of 32 flag bits.   Setting bit 0 to 0 indicates that the
  502.        data is compressed using the Modified Modified READ (MMR) two-
  503.  
  504.  
  505.  
  506. Parsons & Rafferty           Informational                      [Page 9]
  507.  
  508. RFC 2306                     TIFF-F Profile                   March 1998
  509.  
  510.  
  511.        dimensional compression method.  MMR compressed Data is two-
  512.        dimensional and does not use EOLs. Each MMR encoded image MUST
  513.        include an "end-of-facsimile-block" (EOFB) code at the end of
  514.        each coded strip (see section 3.8.6). Uncompressed data is not
  515.        applicable for bi-level facsimile images, so that bit 1 must be
  516.        set to 0.  Unused bits must be set to 0. Bit 0 is the low-order
  517.        bit. The default value is 0 (all bits 0).
  518.                bit 0 = 0 for 2-Dimensional
  519.                bit 1 = must be 0 (uncompressed data not allowed)
  520.  
  521.        In earlier versions of TIFF, this field was named Group4Options.
  522.        The significance has not changed and the present definition is
  523.        compatible.
  524.  
  525.        In addition, three new fields, defined as TIFF-F extensions,
  526.        describe page quality.  The information contained in these fields
  527.        is usually obtained from receiving facsimile hardware (if
  528.        applicable).   These fields are optional.  They SHOULD NOT be
  529.        used in writing TIFF-F files for facsimile image data that is
  530.        error corrected or otherwise guaranteed not to have coding
  531.        errors.
  532.  
  533.        Some implementations need to understand exactly the error content
  534.        of the data.  For example, a CAD program might wish to verify
  535.        that a file has a low error level before importing it into a
  536.        high- accuracy document.  Because Group 3 facsimile devices do
  537.        not necessarily perform error correction on the image data, the
  538.        quality of a received page must be inferred from the pixel count
  539.        of decoded scan lines. A "good" scan line is defined as a line
  540.        that, when decoded, contains the correct number of pixels.
  541.        Conversely, a "bad" scan line is defined as a line that, when
  542.        decoded, comprises an incorrect number of pixels.
  543.  
  544.        BadFaxLines (326). SHORT or LONG
  545.        This field reports the number of scan lines with an incorrect
  546.        number of pixels encountered by the facsimile during reception
  547.        (but not necessarily in the file).
  548.  
  549.        Note: PercentBad = (BadFaxLines/ImageLength) * 100
  550.  
  551.    CleanFaxData (327). SHORT
  552.        N =
  553.            0 = Data contains no lines with incorrect pixel counts or
  554.               regenerated lines  (i.e., computer generated)
  555.            1 = Lines with an incorrect pixel count were regenerated by
  556.               receiving device
  557.  
  558.  
  559.  
  560.  
  561.  
  562. Parsons & Rafferty           Informational                     [Page 10]
  563.  
  564. RFC 2306                     TIFF-F Profile                   March 1998
  565.  
  566.  
  567.            2 = Lines with an incorrect pixel count are in the data  and
  568.               were not regenerated by receiving device (i.e. data
  569.               contains bad scan lines)
  570.  
  571.        Many facsimile devices do not actually output bad lines.
  572.        Instead, the previous good line is repeated in place of a bad
  573.        line. Although this substitution, known as line regeneration,
  574.        results in a visual improvement to the image, the data is
  575.        nevertheless corrupted.  The CleanFaxData field describes the
  576.        error content of the data.  That is, when the BadFaxLines and
  577.        ImageLength fields indicate that the facsimile device
  578.        encountered lines with an incorrect number of pixels during
  579.        reception, the CleanFaxData field indicates whether these bad
  580.        lines are actually still in the data or if the receiving
  581.        facsimile device replaced them with regenerated lines.
  582.  
  583.    ConsecutiveBadFaxLines (328). LONG or SHORT.
  584.        This field reports the maximum number of consecutive lines
  585.        containing an incorrect number of pixels encountered by the
  586.        facsimile device during reception (but not necessarily in the
  587.        file).
  588.  
  589.        The BadFaxLines and ImageLength data indicate only the quantity
  590.        of such lines.  The ConsecutiveBadFaxLines field is an
  591.        indicator of their distribution and may therefore be a better
  592.        general indicator of perceived image quality.
  593.  
  594. 3.5  Recommended Fields
  595.  
  596.    hese are fields that MAY be used in encoding TIFF-F files, but are
  597.    ptional in nature and may be ignored by many TIFF readers.  These
  598.    ields are called recommended consistent with historical TIFF-F
  599.    ractice.
  600.  
  601.    BadFaxLines (326) [defined in section 3.4]
  602.  
  603.    CleanFaxData (327) [defined in section 3.4]
  604.  
  605.    ConsecutiveBadFaxLines (328) [defined in section 3.4]
  606.  
  607.    DateTime (306).  ASCII.
  608.        Date and time in the format YYYY:MM:DD HH:MM:SS, in 24-hour
  609.        format. String length including NUL byte is 20 bytes. Space
  610.        between DD and HH.
  611.  
  612.    DocumentName (269).  ASCII.
  613.        This is the name of the document from which the document was
  614.        scanned.
  615.  
  616.  
  617.  
  618. Parsons & Rafferty           Informational                     [Page 11]
  619.  
  620. RFC 2306                     TIFF-F Profile                   March 1998
  621.  
  622.  
  623.  
  624.    ImageDescription (270).  ASCII.
  625.        This is an ASCII string describing the contents of the image.
  626.  
  627.    Orientation (274).  SHORT.
  628.        This field is designated as "Recommended" for consistency with
  629.        historical TIFF-F, but is also a Baseline TIFF field with a
  630.        default value of 1 per [TIFF]. The default value of 1 applies
  631.        if the field is omitted, but for clarity, TIFF-F writers SHOULD
  632.        include this field.  This field might be useful for displayers
  633.        that always want to show the same orientation, regardless of
  634.        the image.  The default value of 1 is "0th row is visual top of
  635.        image, and 0th column is the visual left."  An 180-degree
  636.        rotation is 3.  See [TIFF] for an explanation of other values.
  637.  
  638.    Software (305).  ASCII.
  639.        The optional name and release number of the software package
  640.        that created the image.
  641.  
  642. 3.6   Requirements for TIFF-F Minimum Subset
  643.  
  644.    This section defines the requirements for a minimum subset of TIFF-F
  645.    fields and values that all TIFF-F readers SHOULD support to maximize
  646.    interoperability with current and historical TIFF-F implementations.
  647.    The TIFF-F structure for writing minimum subset files is also
  648.    defined.
  649.  
  650. 3.6.1   Summary of Minimum Subset Fields and Values
  651.  
  652.    A summary of the minimum subset TIFF-F fields and values is provided
  653.    in the following table.  The required fields for the minimum subset
  654.    are shown under the column labeled "Field".  The values for these
  655.    fields in the minimum subset are shown under the column labeled
  656.    "Minimum".
  657.  
  658.   Field             | Minimum      | Comment
  659.   ------------------|--------------|-------------------------------
  660.   BitsPerSample     | 1            |one bit per sample
  661.   Compression       | 3            |3 for T.4 (MH)
  662.   FillOrder         | 2            |LSB first
  663.   ImageWidth        | 1728         |
  664.   ImageLength       |              |required
  665.   NewSubFileType    | Bit 1 = 1    |single page of multipage file
  666.   PageNumber        | X/X          |pg/tot, 0 base, tot in 1st IFD
  667.   PhotometricInterp | 0            |0 is white
  668.   ResolutionUnit    | 2            |inches (default)
  669.   RowsPerStrip      |=ImageLength  |
  670.   SamplesPerPixel   | 1            |one sample per pixel
  671.  
  672.  
  673.  
  674. Parsons & Rafferty           Informational                     [Page 12]
  675.  
  676. RFC 2306                     TIFF-F Profile                   March 1998
  677.  
  678.  
  679.   StripByteCounts   |              |required
  680.   StripOffsets      |              |required
  681.   T4Options         | Bit 0 = 0    |MH
  682.                     | Bit 1 = 0    |
  683.                     | Bit 2 = 0,1  |Non-Byte-aligned,
  684.                     |              | Byte-Aligned EOLs
  685.   XResolution       | 204          |Units is per inch
  686.   YResolution       | 196,98       |Units is per inch
  687.   ------------------|--------------|------------------------------
  688.  
  689. 3.6.2     TIFF-F Minimum Subset File Structure
  690.  
  691.    For implementations which need to write minimum subset TIFF-F files,
  692.    the file structure shown in Figure 3.1 MUST be used:
  693.  
  694.                    +-----------------------+
  695.                    |         Header        |------------+
  696.                    +-----------------------+            | First IFD
  697.                    |      IFD (page 0)     | <----------+ Offset
  698.                +---|                       |------------+
  699.                |   |                       |--+         |
  700.          Value |   +-----------------------+  |         |
  701.         Offset +-->|      Long Values      |  |         |
  702.                    +-----------------------|  | Strip   |
  703.                    |  Image Data (page 0)  |<-+ Offset  |
  704.                    +-----------------------+            | Next IFD
  705.                    |      IFD (page 1)     | <----------+ Offset
  706.                +---|                       |------------+
  707.                |   |                       |--+         |
  708.          Value |   +-----------------------+  |         |
  709.         Offset +-->|      Long Values      |  |         |
  710.                    +-----------------------|  | Strip   |
  711.                    |  Image Data (page 1)  |<-+ Offset  |
  712.                    +-----------------------+            | Next IFD
  713.                    |      IFD (page 2)     | <----------+ Offset
  714.                    +-----------------------+
  715.                    |          :            |
  716.                    |          :            |
  717.  
  718.        Figure 3.1     TIFF-F Minimum Subset File Structure
  719.  
  720.    As depicted in Figure 3.1, the IFD of each page precedes the related
  721.    Image Data for that page.  If present, any long field values appear
  722.    between the IFD and the image data for that page.  For multiple page
  723.    documents, each IFD/image pair is immediately followed by the next
  724.    IFD/image pair in logical page order within the file structure, until
  725.    all pages have been defined.
  726.  
  727.  
  728.  
  729.  
  730. Parsons & Rafferty           Informational                     [Page 13]
  731.  
  732. RFC 2306                     TIFF-F Profile                   March 1998
  733.  
  734.  
  735.    The format for the TIFF Header is as defined in [TIFF].  When writing
  736.    TIFF-F minimum subset files, the value for the byte order in the
  737.    Header SHOULD be II (0x4949, denoting that the bytes in the TIFF file
  738.    are in LSB first (little-endian) order.
  739.  
  740.    This results in a TIFF header whose content is as shown in Figure
  741.    3.2.
  742.  
  743.    | Offset |   Description     | Type   |     Value          |
  744.    +--------+-------------------+--------+--------------------+
  745.    |   0    |   Byte Order      | Short  |  0x4949 (II)       |
  746.    +--------+-------------------+--------+--------------------+
  747.    |   2    |   Version         | Short  |  42                |
  748.    +--------+-------------------+--------+--------------------+
  749.    |   4    | Offset of 0th IFD | Long   |  0x 0000 0008      |
  750.    +--------+-------------------+--------+--------------------+
  751.  
  752.    Figure 3.2: Image File Header for Minimum Subset TIFF-F Files
  753.  
  754.  3.7  Technical Implementation Issues
  755.  
  756. 3.7.1   Strips
  757.  
  758.    Those new to TIFF may not be familiar with the concept of "strips"
  759.    embodied in the three fields RowsPerStrip, StripByteCount,
  760.    StripOffsets.
  761.  
  762.    In general, third-party implementations that read and write TIFF
  763.    files expect the image to be divided into "strips," also known as
  764.    "bands."  Each strip contains a few lines of the image. By using
  765.    strips, a TIFF reader need not load the entire image into memory,
  766.    thus enabling it to fetch and decompress small random portions of the
  767.    image as necessary.
  768.  
  769.    The dimensions of a strip are described by the RowsPerStrip and
  770.    StripByteCount fields.  The location in the TIFF file of each strip
  771.    is contained in the StripOffsets field.
  772.  
  773.    The size of TIFF-F strips is application dependent.  The recommended
  774.    approach for multi-page TIFF-F images is to represent each page as a
  775.    single strip.
  776.  
  777.  
  778.  
  779.  
  780.  
  781.  
  782.  
  783.  
  784.  
  785.  
  786. Parsons & Rafferty           Informational                     [Page 14]
  787.  
  788. RFC 2306                     TIFF-F Profile                   March 1998
  789.  
  790.  
  791. 3.7.2  Bit Order
  792.  
  793.    The default bit order in Baseline TIFF per [TIFF] is indicated by
  794.    FillOrder=1, where bits are not reversed before being stored.
  795.    However, TIFF-F typically utilizes the setting of FillOrder=2, where
  796.    the bit order within bytes is reversed before storage (i.e., bits are
  797.    stored with the Least Significant Bit first).
  798.  
  799.    Facsimile data appears on the phone line in bit-reversed order
  800.    relative to its description in CCITT Recommendation T.4.  Therefore,
  801.    a wide majority of facsimile implementations choose this natural
  802.    order for storage. Nevertheless, TIFF-F readers must be able to read
  803.    data in both bit orders.
  804.  
  805. 3.7.3  Multi-Page
  806.  
  807.    Many existing implementations already read TIFF-F like files, but do
  808.    not support the multi- page field.  Since a multi-page format greatly
  809.    simplifies file management in fax application software, TIFF-F
  810.    specifies multi-page documents (NewSubfileType = 2) as the standard
  811.    case.
  812.  
  813. 3.7.4 Compression
  814.  
  815.    In Group 3 facsimile, there are three compression methods which had
  816.    been standardized as of 1994 and are in common use.  The ITU-T T.4
  817.    recommendation defines a one-dimensional compression method known as
  818.    Modified Huffman (MH) and a two-dimensional method known as Modified
  819.    READ (MR) (READ is short for Relative Element Address Designate).  In
  820.    1984, a somewhat more efficient compression method known as Modified
  821.    Modified READ (MMR) was defined in the T.6 recommendation.  It was
  822.    originally defined for use with Group 4 facsimile, so that this
  823.    compression method has been commonly called Group 4 compression.  In
  824.    1991, the MMR method was approved for use in Group 3 facsimile and
  825.    has since been widely utilized.
  826.  
  827.    TIFF-F permits three different compression methods.  In the most
  828.    common practice, the one-dimensional compression method (Modified
  829.    Huffman) is used.  This is specified by setting the value of the
  830.    Compression field to 3 and then setting bit 0 of the T4Options field
  831.    to 0.  Alternatively, the two dimensional Modified READ method (which
  832.    is much less frequently used in historical TIFF-F implementations)
  833.    may be selected by setting bit 0 to a value of 1.
  834.  
  835.    Optionally, depending upon the implementation requirements, the more
  836.    efficient two-dimensional compression method from T.6 (i.e.  MMR or
  837.    "Group 4 compression") may be selected.  This method is selected by
  838.  
  839.  
  840.  
  841.  
  842. Parsons & Rafferty           Informational                     [Page 15]
  843.  
  844. RFC 2306                     TIFF-F Profile                   March 1998
  845.  
  846.  
  847.    setting the value of the Compression field to 4 and then setting the
  848.    value of the first two bits (and all unused bits) of T6options to 0.
  849.    More information to aid the implementer in making a compression
  850.    selection is contained in section 3.8 on Implementation Warnings.
  851.  
  852. 3.7.5  Example Use of Page-quality Fields
  853.  
  854.    Here are examples for writing the CleanFaxData,  BadFaxLines, and
  855.    ConsecutiveBadFaxLines fields:
  856.  
  857.        1.  Facsimile hardware does not provide page quality
  858.            information: MUST NOT write page-quality fields.
  859.        2.  Facsimile hardware provides page quality information, but
  860.            reports no bad lines.  Write only BadFaxLines = 0.
  861.        3.  Facsimile hardware provides page quality information, and
  862.            reports bad lines.  Write both BadFaxLines and
  863.            ConsecutiveBadFaxLines.  Also write CleanFaxData = 1 or 2 if
  864.            the hardware's regeneration capability is known.
  865.        4.  Source image data stream is error-corrected or otherwise
  866.            guaranteed to be error-free such as for a computer generated
  867.            file:  SHOULD NOT write page-quality fields.
  868.  
  869. 3.7.6   Use of TIFF-F for Streaming Applications
  870.  
  871.    TIFF-F has historically been used for handling fax image files in
  872.    implementations such as store and forward messaging where the entire
  873.    size of the file is known in advance.  While TIFF-F may also possibly
  874.    be used as a file format for cases such as streaming applications,
  875.    different assumptions may be required than those provided in this
  876.    document (e.g., the entire size and number of pages within the image
  877.    are not known in advance).  As a result, a definition for the
  878.    streaming application of TIFF-F is beyond the scope of this document.
  879.  
  880. 3.7.7  TIFF-F Export and Import
  881.  
  882.    Fax implementations that do not wish to support TIFF-F as a native
  883.    format may elect to support it as import/export medium.
  884.  
  885.    Export
  886.  
  887.    It is recommended that implementations export multiple page TIFF-F
  888.    files without manipulating fields and values.   Historically, some
  889.    TIFF-F writers have attempted to produce individual single-page
  890.    TIFF-F files with modified NewSubFileType and PageNumber (page one-
  891.    of-one) values for export purposes.  However, there is no easy way to
  892.    link such multiple single page files together into a logical multiple
  893.    page document, so that this practice is not recommended.
  894.  
  895.  
  896.  
  897.  
  898. Parsons & Rafferty           Informational                     [Page 16]
  899.  
  900. RFC 2306                     TIFF-F Profile                   March 1998
  901.  
  902.  
  903.    Import
  904.  
  905.    A TIFF-F reader MUST be able to handle a TIFF-F file containing
  906.    multiple pages.
  907.  
  908. 3.8  Implementation Warnings
  909.  
  910.    3.8.1  Uncompressed data
  911.  
  912.    TIFF-F requires the ability to read and write at least one-
  913.    dimensional T.4 Huffman ("compressed") data.  Uncompressed data is
  914.    not allowed.  This means that the "Uncompressed" bit in T4Options or
  915.    T6Options must be set to 0.
  916.  
  917. 3.8.2  Encoding and Resolution
  918.  
  919.    Since two-dimensional encoding is not required for Group 3
  920.    compatibility, some historic TIFF-F readers have not been able to
  921.    read such files.  The minimum subset of TIFF-F REQUIRES support for
  922.    one dimensional (Modified Huffman) files, so this choice maximizes
  923.    portability.  However, implementers seeking greater efficiency SHOULD
  924.    use T.6 MMR compression when writing TIFF-F files.  Some TIFF-F
  925.    readers will also support two-dimensional Modified READ files.
  926.    Implementers that wish to have the maximum flexibility in reading
  927.    TIFF-F files SHOULD support all three of these compression methods
  928.    (MH, MR and MMR).
  929.  
  930.    For the case of resolution, almost all facsimile products support
  931.    both standard (98 dpi) vertical resolution  and "fine" (196 dpi)
  932.    resolution.  Therefore, fine-resolution files are quite portable in
  933.    the real world.
  934.  
  935.    In 1993, the ITU-T added support for higher resolutions in the T.30
  936.    recommendation including 200 x 200, 300 x 300, 400 x 400 in dots per
  937.    inch based units.  At the same time, support was added for metric
  938.    dimensions which are equivalent to the following inch based
  939.    resolutions: 391v x 204h and 391v x 408h.  Therefore, the full set of
  940.    inch-based equivalents of the new resolutions are supported in the
  941.    TIFF-F writer, since they may appear in some image data streams
  942.    received from Group 3 facsimile devices.  However, many facsimile
  943.    terminals and older versions of  TIFF-F readers are likely to not
  944.    support the use of these higher resolutions.
  945.  
  946.    Per [T.4], it is permissible for implementations to treat the
  947.    following XResolution values as being equivalent: <204,200> and
  948.    <400,408>.  In a similar respect, the following YResolution values
  949.  
  950.  
  951.  
  952.  
  953.  
  954. Parsons & Rafferty           Informational                     [Page 17]
  955.  
  956. RFC 2306                     TIFF-F Profile                   March 1998
  957.  
  958.  
  959.    may also be treated as being equivalent: <98, 100>, <196, 200>, and
  960.    <391, 400>.   These equivalencies were allowed by [T.4] to permit
  961.    conversions between inch and metric based facsimile terminals.
  962.  
  963.    In a similar respect, the optional support of metric based
  964.    resolutions in the TIFF-F reader (i.e. 77 x 38.5 cm) is included for
  965.    completeness, since they are used in some legacy TIFF-F
  966.    implementations, but this use is not recommended for the creation of
  967.    TIFF-F files by a writer.
  968.  
  969. 3.8.3  EOL byte-aligned
  970.  
  971.    The historical convention for TIFF-F has been that all EOLs in
  972.    Modified Huffman or Modified READ data must be byte-aligned.
  973.    However, Baseline TIFF has permitted use of non-byte-aligned EOLs by
  974.    default, so that a large percentage of TIFF-F reader implementations
  975.    support both conventions.   Therefore, the minimum subset of TIFF-F
  976.    as defined in this document includes support for both byte-aligned
  977.    and non-byte-aligned EOLs.
  978.  
  979.    An EOL is said to be byte-aligned when Fill bits have been added as
  980.    necessary before EOL codes such that EOL always ends on a byte
  981.    boundary, thus ensuring an  EOL-sequence of a one byte preceded by a
  982.    zero nibble: xxxx0000 00000001.
  983.  
  984.    Modified Huffman encoding encodes bits, not bytes. This means that
  985.    the end-of-line token may end in the middle of a byte. In byte
  986.    alignment, extra zero bits (Fill) are added so that the first bit of
  987.    data following an EOL begins on a byte boundary. In effect, byte
  988.    alignment relieves application software of the burden of bit-
  989.    shifting every byte while parsing scan lines for line-oriented image
  990.    manipulation (such as writing a TIFF file).
  991.  
  992.    For Modified READ encoding, each line is terminated by an EOL and a
  993.    one bit tag bit.  Per [T.4], the value of the tag bit is 0 if the
  994.    next line contains two dimensional data and 1 if the next line is a
  995.    reference line.   To maintain byte alignment, fill bits are added
  996.    before the EOL/tag bit sequence, so that the first bit of data
  997.    following an MR tag bit begins on a byte boundary.
  998.  
  999. 3.8.4  EOL
  1000.  
  1001.    As illustrated in FIGURE 1/T.4 in [T.4], facsimile documents encoded
  1002.    with Modified Huffman begin with an EOL (which in TIFF-F may be
  1003.    byte-aligned). The last line of the image is not terminated by an
  1004.    EOL.  In a similar respect, images encoded with Modified READ two
  1005.    dimensional encoding begin with an EOL, followed by a tag bit.
  1006.  
  1007.  
  1008.  
  1009.  
  1010. Parsons & Rafferty           Informational                     [Page 18]
  1011.  
  1012. RFC 2306                     TIFF-F Profile                   March 1998
  1013.  
  1014.  
  1015. 3.8.5  RTC Exclusion
  1016.  
  1017.    Aside from EOLs, TIFF-F files have historically only contained image
  1018.    data. This means that implementations which wish to maintain strict
  1019.    conformance with the rules in [TIFF] and compatibility with
  1020.    historical TIFF-F, SHOULD NOT include the Return To Control sequence
  1021.    (RTC) (consisting of 6 consecutive EOLs) when writing TIFF- F files.
  1022.    However, implementations which need to support "transparency" of
  1023.    [T.4] image data MAY include RTCs when writing TIFF-F files if the
  1024.    flag settings of the T4Options field are set for non-byte aligned MH
  1025.    or MR image data.  Implementors of TIFF readers should also be aware
  1026.    that there are some existing TIFF-F implementations which include the
  1027.    RTC sequence in MH/MR image data.  Therefore, TIFF-F readers MUST be
  1028.    able to process files which do not include RTCs and SHOULD be able to
  1029.    process files which do include RTCs.
  1030.  
  1031. 3.8.6  Use of EOFB for T.6 Compressed Images
  1032.  
  1033.    TIFF-F pages which are encoded with the T.6 Modified Modified READ
  1034.    compression method MUST include an "end-of-facsimile-block" (EOFB)
  1035.    code at the end of each coded strip. Per [TIFF], the EOFB code is
  1036.    followed by pad bits as needed to align on a byte boundary.   TIFF
  1037.    readers SHOULD ignore any bits other than pad bits beyond the EOFB.
  1038.  
  1039. 3.9  TIFF-F Fields Summary
  1040.  
  1041.    Implementations may choose to implement a TIFF-F Reader, TIFF-F
  1042.    Writer or both, depending upon application requirements.  The TIFF- F
  1043.    Reader is typically used to read an existing TIFF-F file which
  1044.    resides on a computer or peripheral device.  The TIFF-F Writer is
  1045.    typically used to convert a bi-level image bit stream into a TIFF-F
  1046.    compliant file. For many Internet applications, only the Reader needs
  1047.    to be implemented. The specific field support required for TIFF-F
  1048.    Readers and Writers is summarized below.
  1049.  
  1050. 3.9.1  TIFF Reader
  1051.  
  1052.    The fields in the following table are specified for a TIFF-F Reader.
  1053.    The range of values for required and recommended fields are as shown.
  1054.    The minimum subset of values are also shown. If required fields are
  1055.    omitted in a TIFF-F file, the Baseline TIFF default value will apply.
  1056.    Image data must not have any coding errors. In the table, certain
  1057.    fields have a value that is a sequence of flag bits (e.g. T4Options).
  1058.    An implementation should test the setting of the relevant flag bits
  1059.    individually to allow extensions to the sequence of flag bits to be
  1060.    appropriately ignored.
  1061.  
  1062.  
  1063.  
  1064.  
  1065.  
  1066. Parsons & Rafferty           Informational                     [Page 19]
  1067.  
  1068. RFC 2306                     TIFF-F Profile                   March 1998
  1069.  
  1070.  
  1071.    As noted within [TIFF], a TIFF file begins with an 8-byte image file
  1072.    header, of which the first two bytes (0-1) contain the byte order
  1073.    within the file.  The permissible values are:
  1074.  
  1075.        II- Byte order from least significant byte to the most
  1076.            significant byte (little-endian)
  1077.        MM - byte order is always from most significant to least
  1078.            significant (big-endian)
  1079.  
  1080.    For a TIFF-F Reader, the legal values are:
  1081.  
  1082.        ByteOrder: MM,II (Either byte order is allowed)
  1083.  
  1084. 3.9.1.1  Fields for TIFF-F Reader
  1085.  
  1086.    Recommended Fields in the table are shown with an asterisk (*).
  1087.  
  1088.    Other fields may be present, but they should be of an informational
  1089.    nature, so that a reader can elect to ignore them.
  1090.  
  1091.    Informational fields which are often present in TIFF-F images are:
  1092.       Software, Datetime, BadFaxLines, CleanFaxData and
  1093.       ConsecutiveBadFaxLines.
  1094.  
  1095.   Field             | Values      | Minimum     | Comment
  1096.   ------------------|-------------|-------------|----------------------
  1097.   BitsPerSample     | 1           | 1           |one bit per sample
  1098.   Compression       | 3,4         | 3           |3 for T.4 (MH, MR)
  1099.                     |             |             |4 for T.6 - MMR
  1100.   FillOrder         | 2,1         | 2           |LSB first or MSB first
  1101.   ImageWidth        | 1728, 2048, | 1728        |depends on XResolution
  1102.                     | 2432, 2592, |             |
  1103.                     | 3072, 3648, |             |
  1104.                     | 3456, 4096, |             |
  1105.                     | 4864        |             |
  1106.   ImageLength       | >0          |             |required
  1107.   NewSubFileType    | Bit 1 = 1   | Bit 1 = 1   |single page of
  1108.                     |             |             |multipage file
  1109.   Orientation *     | 1           |             |1st row=top left,
  1110.                     |             |             | 1st col=top
  1111.   PageNumber        | X/X         | 0/1         |pg/tot, 0 base,
  1112.                     |             |             | tot in 1st IFD
  1113.   PhotometricInterp | 0,1         | 0           |0 is white
  1114.   ResolutionUnit    | 2,3         | 2           |inches (default)
  1115.   RowsPerStrip      |=ImageLength |=ImageLength |
  1116.                     | or other    |             |
  1117.   SamplesPerPixel   | 1           | 1           |one sample per pixel
  1118.   StripByteCounts   | >0          |             |required
  1119.  
  1120.  
  1121.  
  1122. Parsons & Rafferty           Informational                     [Page 20]
  1123.  
  1124. RFC 2306                     TIFF-F Profile                   March 1998
  1125.  
  1126.  
  1127.   StripOffsets      | >0          |             |required
  1128.   T4Options         | Bit 0 = 0,1 | Bit 0 = 0   |MH,MR(incl if not MMR)
  1129.                     | Bit 1 = 0   | Bit 1 = 0   |
  1130.                     | Bit 2 = 0,1 | Bit 2 = 0,1 | Non-Byte-aligned and
  1131.                     |             |             | Byte-Aligned EOLs
  1132.   T6Options         | 0           |             |MMR (incl only if MMR)
  1133.   XResolution       | 204,200,300,| 204         | If unit is per inch
  1134.                     | 400,408,    |             |
  1135.                     | 77          |             | If unit is per cm
  1136.   YResolution       | 196,98,100, | 196,98      | If unit is per inch
  1137.                     | 200,300,391,|             |
  1138.                     | 400,        |             |
  1139.                     | 77,38.5     |             | If unit is per cm
  1140.   ------------------|-------------|-------------|----------------------
  1141.  
  1142. 3.9.2  TIFF-F Writer
  1143.  
  1144.    For the case of writing (creating) a TIFF-F file format from an image
  1145.    data stream or other raster data, implementations SHOULD write files
  1146.    which can be read by a TIFF-F Reader as defined in 3.9.1.  It is
  1147.    recommended that all fields from the table in 3.9.1.1 SHOULD be
  1148.    included when writing TIFF-F files in order to  minimize dependencies
  1149.    on default values. Image data must not have any coding errors.
  1150.  
  1151.    Other fields may be present, but they should be of an informational
  1152.    nature, so that a Reader may elect to ignore them.
  1153.  
  1154.    For the case of writing "minimum subset" TIFF-F files, the rules
  1155.    defined in section 3.6 apply.
  1156.  
  1157.    Informational fields that may be useful for TIFF-F files are:
  1158.        Software, Datetime, BadFaxLines, ConsecutiveBadFaxLines
  1159.  
  1160.    TIFF Writers SHOULD only generate the fields that describe facsimile
  1161.    image quality when the image has been generated from a fax image data
  1162.    stream where error correction (e.g. Group 3 Error Correction Mode)
  1163.    was not used.  These fields are:  CleanFaxData, BadFaxLines and
  1164.    ConsecutiveBadFaxLines.
  1165.  
  1166. 4.  MIME sub-type image/tiff
  1167.  
  1168.    [TIFFREG] describes the registration of the MIME content-type image/
  1169.    tiff to refer to TIFF 6.0 encoded image data.   When transported by
  1170.    MIME, the TIFF content defined by this document must be encoded
  1171.    within an image/tiff content type. In addition, an optional
  1172.    "application" parameter is defined for image/tiff to identify a
  1173.    particular application's subset of TIFF and TIFF extensions for the
  1174.  
  1175.  
  1176.  
  1177.  
  1178. Parsons & Rafferty           Informational                     [Page 21]
  1179.  
  1180. RFC 2306                     TIFF-F Profile                   March 1998
  1181.  
  1182.  
  1183.    encoded image data, if it is known. Typically, this would be used to
  1184.    assist the recipient in dispatching a suitable rendering package to
  1185.    handle the display or processing of the image file.
  1186.  
  1187. 4.1 Refinement of MIME sub-type image/tiff for Application F
  1188.  
  1189.    Since this document defines a facsimile specific profile of TIFF, it
  1190.    is useful to note an appropriate application parameter for the
  1191.    image/tiff MIME content-type.
  1192.  
  1193.    The "faxbw" application parameter is defined for black and white
  1194.    facsimile.  It is suitable for use by applications that can process
  1195.    one or more TIFF for facsimile profiles or subsets used for the
  1196.    encoding of black and white facsimile data.
  1197.  
  1198.    Since this document defines a profile of TIFF for facsimile which is
  1199.    suitable for use with black and white facsimile image data,
  1200.    applications which use this profile or its minimum subset should set
  1201.    the value of the application parameter to "faxbw".
  1202.  
  1203.    An example of the use of the image/tiff MIME Content-type with the
  1204.    application parameter set with the value "faxbw" follows:
  1205.  
  1206.    Example:
  1207.  
  1208.           Content-type: image/tiff; application=faxbw
  1209.  
  1210.    In this example, use of this parameter value will enable applications
  1211.    to identify the content as being within a profile or subset of TIFF
  1212.    for Facsimile that is suitable for encoding black and white image
  1213.    data, before attempting to process the image data.
  1214.  
  1215. 5.  Implementation Usage
  1216.  
  1217.    5.1 Internet Fax Usage
  1218.  
  1219.    The usage of TIFF-F is envisioned as a component of Internet Fax.  It
  1220.    is anticipated that Internet Fax may use both a TIFF-F Reader and
  1221.    TIFF-F Writer. The details of the Internet Fax services and their use
  1222.    of TIFF-F will be specified in other documents.
  1223.  
  1224. 5.2 VPIM Usage
  1225.  
  1226.    The Application F of TIFF (i.e. TIFF-F content) is a secondary
  1227.    component of the VPIM Message as defined in [VPIM2].  Voice messaging
  1228.    systems can often handle fax store-and-forward capabilities in
  1229.    addition to traditional voice message store-and- forward functions.
  1230.  
  1231.  
  1232.  
  1233.  
  1234. Parsons & Rafferty           Informational                     [Page 22]
  1235.  
  1236. RFC 2306                     TIFF-F Profile                   March 1998
  1237.  
  1238.  
  1239.    As a result, TIFF-F fax messages can optionally be sent between
  1240.    compliant VPIM systems, and may be rejected if the recipient system
  1241.    cannot deal with fax.
  1242.  
  1243.    Refer to the VPIM Specification for proper usage of this content.
  1244.  
  1245. 6.  Security Considerations
  1246.  
  1247.    This document describes the encoding for TIFF-F, which is a profile
  1248.    of the TIFF encoding for facsimile.  As such, it does not create any
  1249.    security issues not already identified in [TIFFREG], in its use of
  1250.    fields as defined in [TIFF]. There are also new TIFF fields defined
  1251.    within this specification, but they are of a purely descriptive
  1252.    nature, so that no new security risks are incurred.
  1253.  
  1254.    Further, the encoding specified in this document does not in any way
  1255.    preclude the use of any Internet security protocol to encrypt,
  1256.    authenticate, or non-repudiate TIFF-F encoded facsimile messages.
  1257.  
  1258. 7.  Authors' Addresses
  1259.  
  1260.    Glenn W. Parsons
  1261.    Northern Telecom
  1262.    P.O. Box 3511, Station C
  1263.    Ottawa, ON  K1Y 4H7
  1264.    Canada
  1265.    Phone: +1-613-763-7582
  1266.    Fax:   +1-613-763-2697
  1267.    Email: Glenn.Parsons@Nortel.ca
  1268.  
  1269.    James Rafferty
  1270.    Human Communications
  1271.    12 Kevin Drive
  1272.    Danbury, CT 06811-2901
  1273.    USA
  1274.    Phone: +1-203-746-4367
  1275.    Fax:   +1-203-746-4367
  1276.    Email: Jrafferty@worldnet.att.net
  1277.  
  1278. 8. References
  1279.  
  1280.    [MIME1] Freed, N. and N. Borenstein,  "Multipurpose Internet Mail
  1281.         Extensions (MIME) Part One: Format of Internet Message Bodies",
  1282.         RFC 2045, November 1996.
  1283.    [MIME4] Freed, N. and N. Borenstein,  "Multipurpose Internet Mail
  1284.         Extensions (MIME) Part Four: Registration Procedures", RFC 2048,
  1285.         November 1996.
  1286.  
  1287.  
  1288.  
  1289.  
  1290. Parsons & Rafferty           Informational                     [Page 23]
  1291.  
  1292. RFC 2306                     TIFF-F Profile                   March 1998
  1293.  
  1294.  
  1295.    [REQ] Bradner, S., "Key words for use in RFCs to Indicate
  1296.         Requirement Levels", RFC 2119, March 1997.
  1297.    [T.30] ITU-T Recommendation T.30 - "Procedures for Document
  1298.         Facsimile Transmission in the General Switched Telephone
  1299.         Network", June, 1996
  1300.    [T.4] ITU-T Recommendation T.4 - "Standardization of Group 3
  1301.         Facsimile Apparatus for Document Transmission", June, 1996
  1302.    [T.6] ITU-T Recommendation T.6 - "Facsimile Coding Schemes and
  1303.         Coding Control Functions for Group 4 Facsimile Apparatus",
  1304.         March, 1993
  1305.    [TIFF] Adobe Developers Association, TIFF (TM) Revision 6.0 -
  1306.         Final, June 3, 1992.
  1307.    [TIFFREG] Parsons, G., Rafferty, J. and S. Zilles, "Tag Image File
  1308.         Format (TIFF) - image/tiff:  MIME Sub-type Registration ", RFC
  1309.         2302, March 1998.
  1310.    [VPIM2] G. Vaudreuil and G. Parsons, "Voice Profile for Internet
  1311.         Mail - version 2", Work In Progress, <draft-ema-vpim-06.txt>,
  1312.         November 1997.
  1313.  
  1314.  
  1315.  
  1316.  
  1317.  
  1318.  
  1319.  
  1320.  
  1321.  
  1322.  
  1323.  
  1324.  
  1325.  
  1326.  
  1327.  
  1328.  
  1329.  
  1330.  
  1331.  
  1332.  
  1333.  
  1334.  
  1335.  
  1336.  
  1337.  
  1338.  
  1339.  
  1340.  
  1341.  
  1342.  
  1343.  
  1344.  
  1345.  
  1346. Parsons & Rafferty           Informational                     [Page 24]
  1347.  
  1348. RFC 2306                     TIFF-F Profile                   March 1998
  1349.  
  1350.  
  1351. 9.  Full Copyright Statement
  1352.  
  1353.    Copyright (C) The Internet Society (1998).  All Rights Reserved.
  1354.  
  1355.    This document and translations of it may be copied and furnished to
  1356.    others, and derivative works that comment on or otherwise explain it
  1357.    or assist in its implementation may be prepared, copied, published
  1358.    and distributed, in whole or in part, without restriction of any
  1359.    kind, provided that the above copyright notice and this paragraph are
  1360.    included on all such copies and derivative works.  However, this
  1361.    document itself may not be modified in any way, such as by removing
  1362.    the copyright notice or references to the Internet Society or other
  1363.    Internet organizations, except as needed for the purpose of
  1364.    developing Internet standards in which case the procedures for
  1365.    copyrights defined in the Internet Standards process must be
  1366.    followed, or as required to translate it into languages other than
  1367.    English.
  1368.  
  1369.    The limited permissions granted above are perpetual and will not be
  1370.    revoked by the Internet Society or its successors or assigns.
  1371.  
  1372.    This document and the information contained herein is provided on an
  1373.    "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
  1374.    TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
  1375.    BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
  1376.    HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
  1377.    MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
  1378.  
  1379.  
  1380.  
  1381.  
  1382.  
  1383.  
  1384.  
  1385.  
  1386.  
  1387.  
  1388.  
  1389.  
  1390.  
  1391.  
  1392.  
  1393.  
  1394.  
  1395.  
  1396.  
  1397.  
  1398.  
  1399.  
  1400.  
  1401.  
  1402. Parsons & Rafferty           Informational                     [Page 25]
  1403.  
  1404.